/**
 * @author		Sergey Suzdalskiy
 * @e-mail:		sergey.suzdalskiy@gmail.com
 */
package ua.kiev.gcore.net.connections.event  {
	import flash.events.Event;

	public class CommunicateEvent extends Event {

		public static var CONNECT:String = "connect";
		public static var DATA_RECEIVED:String = "dataReceived";
		public static var CONNECT_FAILED:String = "connectFailed";

		public function CommunicateEvent(type:String , bubbles:Boolean = false , cancelable:Boolean = false) {
			super(type, bubbles, cancelable);
		}

		public var command:String;
		public var connectionId:int;
		public var message:String;
		
		public override function clone():Event {
			var event:CommunicateEvent = new CommunicateEvent(this.type, this.bubbles, this.cancelable);
			event.command = this.command;
			event.connectionId = this.connectionId;
			event.message = this.message;
			return event;
		}
	}
}
